package cn.lingyangwl.agile.system;

import cn.lingyangwl.agile.tenant.core.ITenantDataHandler;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author shenguangyang
 */
@Service
@ConditionalOnBean(SystemApi.class)
public class TenantDataHandler implements ITenantDataHandler {
    @Resource
    private SystemApi systemApi;

    @Override
    public String getMgtSceneTenantId(String tenantId) {
        return systemApi.getMgtSceneTenantId(tenantId);
    }

    @Override
    public String getMainTenantId(String tenantId) {
        return systemApi.getMainTenantId(tenantId);
    }
}
